package com.pethome.pet.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pethome.pet.domain.PetKind;
import com.pethome.pet.mapper.PetKindMapper;
import com.pethome.pet.service.IPetKindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 宠物品种Service业务层处理
 * 
 * @author hjc
 * @date 2024-08-26
 */
@Service
public class PetKindServiceImpl extends ServiceImpl<PetKindMapper, PetKind> implements IPetKindService
{
     @Autowired
    private PetKindMapper petKindMapper;

    @Override
    public List<PetKind> getKindList() {
        return this.list();
    }

    /**
     * 查询宠物品种
     * 
     * @param petKindId 宠物品种主键
     * @return 宠物品种
     */
    @Override
    public PetKind selectPetKindByPetKindId(Long petKindId)
    {
        return petKindMapper.selectPetKindByPetKindId(petKindId);
    }

    /**
     * 查询宠物品种列表
     * 
     * @param petKind 宠物品种
     * @return 宠物品种
     */
    @Override
    public List<PetKind> selectPetKindList(PetKind petKind)
    {
        return petKindMapper.selectPetKindList(petKind);
    }

    /**
     * 新增宠物品种
     * 
     * @param petKind 宠物品种
     * @return 结果
     */
    @Override
    public int insertPetKind(PetKind petKind)
    {
        return petKindMapper.insertPetKind(petKind);
    }

    /**
     * 修改宠物品种
     * 
     * @param petKind 宠物品种
     * @return 结果
     */
    @Override
    public int updatePetKind(PetKind petKind)
    {
        return petKindMapper.updatePetKind(petKind);
    }

    /**
     * 批量删除宠物品种
     * 
     * @param petKindIds 需要删除的宠物品种主键
     * @return 结果
     */
    @Override
    public int deletePetKindByPetKindIds(Long[] petKindIds)
    {
        return petKindMapper.deletePetKindByPetKindIds(petKindIds);
    }

    /**
     * 删除宠物品种信息
     * 
     * @param petKindId 宠物品种主键
     * @return 结果
     */
    @Override
    public int deletePetKindByPetKindId(Long petKindId)
    {
        return petKindMapper.deletePetKindByPetKindId(petKindId);
    }
}
